﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for DATABASE_CONTROL
/// </summary>
public class DATABASE_CONTROL
{
    private SqlConnection con;
    private SqlDataAdapter da;
    private SqlCommand com;
    private SqlDataReader dr;
	
		//
		// TODO: Add constructor logic here
		//
    string con_str = WebConfigurationManager.ConnectionStrings["OTO"].ConnectionString;
    //string con_str = "Data Source=.;Initial Catalog=OTO;Persist Security Info=True;User ID=sa;PWD=traiitc";
    public SqlConnection CheckConnect()
    {
       try
       {
           con = new SqlConnection(con_str);
           return con;
       }
       catch
       {
           return new SqlConnection();
       }
    }
    
        
	
}